package com.google.code.stalkernet.node.event;

import java.util.EventListener;

/**
 * Receives notifications about node-related events.
 *
 * @author Mikhail Vladimirov
 */
public interface NodeListener extends EventListener
{
    /**
     * Called when peer was added.
     *
     * @param nodeEvent event details
     */
    public void peerAdded (NodeEvent nodeEvent);

    /**
     * Called when peer was remove.
     *
     * @param nodeEvent event details
     */
    public void peerRemoved (NodeEvent nodeEvent);

    /**
     * Called when advertisement was received from the peer.
     *
     * @param nodeEvent event details
     */
    public void advertisementReceived (NodeEvent nodeEvent);
}
